package edu.sctu.practice.class02.yangshengyu.three10;

import java.util.Scanner;

/**
 * Created by Cullen on 2015/8/13.
 */
public class N38 {
    public static void main(String[] args) {
        int s=0;
        System.out.println("请输入整数a：");
        Scanner input=new Scanner(System.in);
        int a=input.nextInt();
        System.out.println("请输入整数b：");
        Scanner input1=new Scanner(System.in);
        int b=input.nextInt();
        System.out.println("请选择运算符“+、-、*、/ 、％”中的一个：");
        Scanner input2=new Scanner(System.in);
        String str = input2.next();
        char i = str.charAt(0);
        switch (i){
            case '+':
                s=a+b;break;
            case '-':
                s=a-b;break;
            case '*':
                s=a*b;break;
            case '/':
                s=a/b;break;
            case '%':
                s=a%b;break;
        }
        System.out.print("a"+i+"b的值为："+s+"!");
    }
}
